import request from "@/utils/request";
import { AesMain } from "@/utils/AesHmacMD5"

// 校验模板编码的唯一性
export function unique(query) {
  return request({
    url: "/admin/budget/form/unique/",
    method: "post",
    data: AesMain(query)
  });
}


// excel 录入保存信息
export function addEnter(enterForm) {
  return request({
    url: "/admin/budget/enter/addEnter/",
    method: "post",
    data: AesMain(enterForm)
  });
}

// excel 查看录入信息
export function enterListType(enterForm) {
  return request({
    url: "/admin/budget/enter/enterListType/",
    method: "post",
    data: AesMain(enterForm)
  });
}

// excel 录取-------------下载
export function downloadEnterdata(enterForm) {
  return request({
    url: "/admin/budget/enter/downloadEnterdata/",
    method: "post",
    data: AesMain(enterForm)
  });
}
// 删除enter列表
export function delEnterType(query) {
  return request({
    url: "/admin/budget/enter/delEnterType/",
    method: "post",
    data: AesMain(query)
  });
}

// 删除模板列表
export function treeByFormId(formId) {
  return request({
    url: "/admin/budget/form/treeByFormId/" + formId + "/",
    method: "get"
  });
}

// ================================================================================
// ================================================================================
// ================================================================================

// 查询模板列表
export function listType(query) {
  return request({
    url: "/admin/budget/approve/list/",
    method: "post",
    data: AesMain(query)
  });
}

// 校验模板表头数据是否重复---针对于整个表头数据
export function inspectHeaderAll(query) {
  return request({
    url: "/admin/budget/form/inspectHeaderAll/",
    method: "post",
    data: AesMain(query)
  });
}

// 新增批复台账
export function addType(query) {
  return request({
    url: "/admin/budget/approve/add/",
    method: "post",
    data: AesMain(query)
  });
}

//新增批复号
export function addPfh(query) {
  return request({
    url: "/admin/budget/approve/addPfh/",
    method: "post",
    data: AesMain(query)
  });
}


//新增单条批复数据
export function addApprove(query) {
  return request({
    url: "/admin/budget/approve/addApprove/",
    method: "post",
    data: AesMain(query)
  });
}
export function dataEche(query) {
  return request({
    url: "/admin/budget/form/dataEche/",
    method: "post",
    data: AesMain(query)
  });
}

// 修改模板列表
export function editType(query) {
  return request({
    url: "/admin/budget/form/edit/",
    method: "post",
    data: AesMain(query)
  });
}

// 修改模板列表
export function editApprove(query) {
  return request({
    url: "/admin/budget/approve/edit/",
    method: "post",
    data: AesMain(query)
  });
}
// 删除预算数据
export function delType(formworkId) {
  return request({
    url: "/admin/budget/approve/delete/",
    method: "post",
    data: AesMain(formworkId)
  });
}

// 模板转字典类型
export function modelToDict() {
  return request({
    url: "/admin/budget/form/modelToDict/",
    method: "post",
    data: AesMain()
  });
}

//查询井的皮肤投资与总投资信息
export function listApproveCostType(query) {
  return request({
    url: "/admin/budget/approve/listApproveCostType/",
    method: "post",
    data: AesMain(query)
  });
}


//下载模板文件
export function downmodel(query) {
  return request({
    url: "/admin/budget/approve/downmodel/",
    method: "post",
    data: AesMain(query)
  });
}
//==================预警接口
//ledger/getWarningList
export function getWarningList(query) {
  return request({
    url: "/admin/budget/ledger/getWarningList/",
    method: "post",
    data: AesMain(query)
  });
}
//井ledger/getWarningWellnameList/
export function getWarningWellnameList(query) {
  return request({
    url: "/admin/budget/ledger/getWarningWellnameList/",
    method: "post",
    data: AesMain(query)
  });
}
//常规井查询
export function getcgWarningList(query) {
  return request({
    url: "/admin/budget/ledger/getcgWarningList/",
    method: "post",
    data: AesMain(query)
  });
}
//查询预警
export function getWellWarning(query) {
  return request({
    url: "/admin/budget/ledger/getWellWarning/",
    method: "post",
    data: AesMain(query)
  });
}
//获取门槛值
export function getMkzList(query) {
  return request({
    url: "/admin/budget/ledger/getMkzList/",
    method: "post",
    data: AesMain(query)
  });
}
//修改门槛值ledger/updateMkzList/
export function updateMkz(query) {
  return request({
    url: "/admin/budget/ledger/updateMkzList/",
    method: "post",
    data: AesMain(query)
  });
}


